home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 November
/
Chip_2000-11_cd2.bin
/
sharewar
/
Slunec
/
app
/
17
/
_SETUP.1
/
Seznam oken.pw
< prev
next >
Wrap
Text File
|
2000-08-30
|
2KB
|
53 lines
{*******************************************************}
{ }
{ Programmer's Wizard 2 Pascal Script }
{ (popis jazyka v souboru SCRIPT.DOC) }
{ }
{*******************************************************}
uses ScriptUtils;
function GetVerStr: string;
var
mMajor, mMinor, mRel: Integer;
Begin
GetVersionEx(mMajor, mMinor, mRel);
result := 'v' + IntToStr(mMajor) + '.' + IntToStr(mMinor) + '.' +
IntToStr(mRel);
end;
function GetValidVerStr: string;
Begin
result := 'v2.0.1'; //pozadovana verze PW
end;
var
mIndex: Integer;
mHandles: Array of LongInt;
mFiles: Array of String;
mS, mName: String;
mAnswer: Integer;
Begin
if GetValidVerStr <> GetVerStr then //nespravna verze?
ShowMessage('Upozorn∞nφ: tento skript byl napsßn pro Programmers Wizard ' +
GetValidVerStr + '. Momentßln∞ spuÜt∞nß verze: ' + GetVerStr);
//vytvorit snapshot woken
EnumWindows(mHandles);
SetArrayLength(mFiles, GetArrayLength(mHandles));
//prevest na citelnejsi retezec
for mIndex := 0 to GetArrayLength(mHandles) - 1 do Begin
WindowToPluginEntryID(mHandles[mIndex], mS);
PluginEntryIDToName(mS, mName);
WindowToFileName(mHandles[mIndex], mS);
mFiles[mIndex] := ExtractFileName(mS) + ' [' + mName + ']';
end;
//zobrazit dialog se seznamem nalezenych woken
mAnswer := ShowListDialog('Dokumenty', 'Prßv∞ otev°enΘ dokumenty:', mFiles);
if mAnswer <> -1 then
BringWindowToTop(mHandles[mAnswer]); //a prenest dopredu
end.